<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/common/common.jsp"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title></title>
    <link rel="stylesheet" href="./css/layui.css">
  </head>
  
  <body>
   <form class="layui-form" id="form" action="<%= basePath%>/StaffAction_list.action" method="post">
    <blockquote class="layui-elem-quote mylog-info-tit">
        <div class="layui-input-inline">
    		  <input type="text" name="planName" placeholder="请输入招聘计划名称" autocomplete="off" class="layui-input" >
 	 	</div>
        <button class="layui-btn" lay-submit name="formDemo">搜索</button>
    </blockquote>
</form>
<table class="layui-table" lay-even  lay-size="sm" lay-filter="demo">
    <thead>
    <tr>
        <th> 编 号 </th>
        <th>招聘计划编号</th>
        <th>招聘计划名称</th>
        <th>岗位要求</th>
        <th>申请人</th>
        <th>申请人学号</th>
        <th>申请人照片</th>
        <th> 审 核  </th>
    </tr>
    </thead>
    <tbody>
      <c:forEach var="list" items="${list}">
            <tr>
                <td>${list.id}</td>
                <td>${list.planId}</td>
                <td>${list.planName}</td>
                <td>${list.requirement}</td>
                <td>${list.username}</td>
                <td>${list.studentId}</td>
                <td><img class="layui-upload-img" style="width: auto; height: 50px;"  src="${list.saveAddress}"></td>
                
                		<c:if test="${0 == list.isAgree}">
		                <td><p class="layui-btn layui-btn-radius layui-btn-warm">待审核</p></td>
		                </c:if>
		                <c:if test="${1 == list.isAgree}">
		               <td><p class="layui-btn layui-btn-radius layui-btn-normal">已通过</p></td>
		                </c:if>
		                <c:if test="${2 == list.isAgree}">
		                 <td><p class="layui-btn layui-btn-radius layui-btn-danger">未通过</p></td>
		                </c:if>
            </tr>
  	 </c:forEach>
    </tbody>
</table>
<div id="demo7"></div>

<!-- js控件 -->
<script src="<%=path%>/js/layui.all.js" type="text/javascript"></script>
<script type="text/javascript">
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        //监听提交
        form.on('submit(formDemo)', function(data){
        });
        form.render();
 
    });
 
</script>
<script type="text/javascript">
    //    分页组件
    layui.use('laypage', function(){
        var laypage = layui.laypage;
        var planName = "${plan.planName}";//模糊查询的内容
        var total = "${pageResult.total}";//记录总数
        var page = "${pageResult.page}";//当前页
        var size = "${pageResult.size}";//每页多少
        //完整功能
        laypage.render({
            elem: 'demo7'
            ,count: total
            ,limit: size
            ,curr: page
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj, first){
                console.log(obj);
                if (!first) { //请求分页的链接
                  window.location.href = "<%=basePath%>/StaffAction_list.action";
                }
            }
        });
 
    });
</script>
  </body>
</html>
